import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:xvideos/hj_page/mine_business/mine_setting/mine_setting_profile_controller.dart';
import 'package:xvideos/hj_utils/widget_utils.dart';

enum SettingProfileType {
  nickName,
  slogan,
}

class SettingProfilePage extends StatelessWidget {
  final SettingProfileType type;
  static const String routeName = '/setting/profile';
  const SettingProfilePage(this.type, {super.key});

  @override
  Widget build(BuildContext context) {
    return GetBuilder<MineSettingProfilePage>(
      init: instanceSettingProfileController(type),
      builder: (controller) => Scaffold(
        appBar: AppBar(
          title: Text(controller.title),
          actions: [
            GestureDetector(
              onTap: () => controller.onSaveProfile(),
              child: Text(
                '保存',
                style: TextStyle(color: Color(0xff999999), fontSize: 14),
              ),
            ),
            16.sizeBoxW
          ],
        ),
        body: controller.instanceChildItem(0),
      ),
    );
  }
}
